package Servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@WebServlet("/instructorSearch")
public class instructorSearch extends HttpServlet {
	private static final long serialVersionUID = 1L;


	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
	
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		String[] st = new String[10];
		st[0] = request.getParameter("empID");
		st[1] = request.getParameter("department");
		st[2] = request.getParameter("officeHours");
		st[4] = request.getParameter("fName");
		st[5] = request.getParameter("lName");
		st[6] = request.getParameter("address");
		st[7] = request.getParameter("city");
		st[8] = request.getParameter("state");
		st[9] = request.getParameter("zipcode");
		st[3] = request.getParameter("location");
		
		System.out.println("Search Instructor-> "+st[0]+" "+st[1]+" "+st[2]+"\n"+st[3]+" "+st[4]+" "+st[5]+" "+st[6]+" "+st[7]+" "+st[8]+" "+st[9]);
		
		RequestDispatcher rd=getServletContext().getRequestDispatcher("/View/searchInstructor.jsp");
		rd.forward(request, response);
	}

}
